from Base.Base import Base
from selenium.webdriver.common.by import By
class Page1(Base):
    login_loc =(By.XPATH,'//*[@id="app"]/div/section/aside/ul/li/ul/li[4]/a')
    def login(self):
        self.click(self.login_loc)
    username_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[1]/div/input')
    def username(self):
        self.sendkeys(self.username_loc,'admin')
    password_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[2]/div/input')
    def password(self):
        self.sendkeys(self.password_loc,'admin')
    loginbtn_loc  =(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/button[2]')
    def loginbtn(self):
        self.click(self.loginbtn_loc)
    sure_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')
    def sure(self):
        self.click(self.sure_loc)
    #弹窗确认
    #添加客户
    add_loc = (By.XPATH,'//*[@id="app"]/div/section/section/main/form/div/div[2]/div/div/button[2]/span')
    def add(self):
        self.click(self.add_loc)
    name_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[1]/div/div/div/input')
    def name(self):
        self.sendkeys(self.name_loc,'小小规划师')
    gsname_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[2]/div/div/div/input')
    def gsname(self):
        self.sendkeys(self.gsname_loc,'家政通')
    contact_loc= (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[3]/div/div/div/input')
    def contact(self):
        self.sendkeys(self.contact_loc,'类劣')
    email_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[4]/div/div/div/input')
    def email(self):
        self.sendkeys(self.email_loc,'3315608326@qq.com')
    phone_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[5]/div/div/div/input')
    def phone(self):
        self.sendkeys(self.phone_loc,'18451121531')
    queren_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[6]/div/button[1]/span')
    def queren(self):
        self.click(self.queren_loc)
        

